﻿using System;

namespace Bll
{
    public partial class LoginoutBll
    {
        /// <summary>
        /// 删除超过7日的记录
        /// </summary>
        public void Delete7Day()
        {
            DateTime time= DateTime.Now.AddDays(-7d);
            CurrentDal.Delete(a=>a.AddTime<=time);
            CurrentDalSession.SaveChanges();
        }

        /// <summary>
        /// 删除超过15日的记录
        /// </summary>
        public void Delete15Day()
        {
            DateTime time = DateTime.Now.AddDays(-15d);
            CurrentDal.Delete(a => a.AddTime <= time);
            CurrentDalSession.SaveChanges();
        }
    }
}
